import { Entity, Column, PrimaryGeneratedColumn, ManyToOne, JoinColumn, OneToMany, ManyToMany, JoinTable } from "typeorm";

import {BlogEntity} from '../blog/blog.entity'

@Entity({name:'tyk_tag'})
export class TagsEntity{
    @PrimaryGeneratedColumn({name:'tag_id'})
    tagId:number

    @Column()
    name:string

    @ManyToMany(
        type=>BlogEntity,
        blog=>blog.tags
    )
    blogs:BlogEntity[]
}